<?php if (!defined('THINK_PATH')) exit();?><link href="__PUBLIC__/admin/ssi-uploader/styles/ssi-uploader.css" rel="stylesheet">
<script src="__PUBLIC__/admin/ssi-uploader/js/ssi-uploader.js"></script>
<link href="__PUBLIC__/admin/jquery-zoom/css/zoom.css" rel="stylesheet">
<script src="__PUBLIC__/admin/jquery-zoom/js/zoom.js"></script>
<style>
    .panel-group {
        margin-bottom: 0px;
    }
    a{
        text-decoration:none;
    }
    a:link{
        text-decoration:none;
    }
    a:visited{
        text-decoration:none;
    }
    a:hover{
        text-decoration:none;
    }
    a:active{
        text-decoration:none;
    }
    .error{
        color:red;
    }
</style>
<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="title"><?php echo ($data["accountName"]); ?>审核</h4>
        </div>
        <div class="modal-body">
            <form id="shenheForm" class="form-horizontal">
                <input type="hidden" id="id" name="id" value="<?php echo ($info["id"]); ?>" />
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label for="start_set_time" class="col-sm-2 control-label">设置开始日期</label>
                            <div class="col-sm-10">
                                <div class="input-group col-sm-6">
                                <input type="text" class="form-control datetimepicker" id="start_set_time" name="start_set_time"
                                       placeholder="设置开始日期" value="<?php echo ($info["start_set_time"]); ?>" />
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="end_set_time" class="col-sm-2 control-label">设置结束日期</label>
                            <div class="col-sm-10">
                                <div class="input-group col-sm-6">
                                    <input type="text" class="form-control datetimepicker" id="end_set_time" name="end_set_time"
                                           placeholder="设置结束日期" value="<?php echo ($info["end_set_time"]); ?>" />
                                </div>
                            </div>
                        </div>
                        <div class="form-group group-a">
                            <label for="status" class="col-sm-2 control-label">批否</label>
                            <div class="col-sm-10">
                                <div class="btn-group" data-toggle="buttons">
                                    <label class="btn btn-default <?php if($info["status"] == '0'): ?>active<?php endif; ?>">
                                        <input type="radio" name="status" value="0" autocomplete="off" <?php if($info["status"] == '未审核'): ?>checked<?php endif; ?>> 未审核
                                    </label>
                                    <label class="btn btn-default <?php if($info["status"] == '1'): ?>active<?php endif; ?>">
                                        <input type="radio" name="status" value="1" autocomplete="off" <?php if($info["status"] == '通过'): ?>checked<?php endif; ?>> 通过
                                    </label>
                                    <label class="btn btn-default <?php if($info["a_ad_company_type"] == '-1'): ?>active<?php endif; ?>">
                                        <input type="radio" name="status" value="-1" autocomplete="off"  <?php if($info["status"] == '不通过'): ?>checked<?php endif; ?>> 不通过
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group group-a">
                            <label for="remark" class="col-sm-2 control-label">审查意见</label>
                            <div class="col-sm-10">
                                <div class="input-group">
                                    <textarea type="text" class="form-control" id="yijian" name="yijian" placeholder="填写审查意见..." style="width: 400px;"
                                  rows="8"><?php echo ($info["yijian"]); ?></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="form-group group-a">
                            <label for="remark" class="col-sm-2 control-label">备注</label>
                            <div class="col-sm-10">
                                <div class="input-group">
                                    <textarea type="text" class="form-control" id="remark" name="remark" placeholder="填写备注..." style="width: 400px;"
                                              rows="5"><?php echo ($info["remark"]); ?></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label for="addBtn" class="col-sm-5 control-label"></label>
                            <div class="col-sm-7">
                                <button type="button" id="shenheBtn" class="btn btn-primary">确定</button>&nbsp;&nbsp;
                                <a href="__URL__" class="btn btn-default" data-dismiss="modal">取消</a>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="__PUBLIC__/js/bootstrap-typeahead.js"></script>
<script src="__PUBLIC__/js/addclear.js"></script>
<script src="__PUBLIC__/js/jquery.cookie.js"></script>
<script>
    $(function() {
        $('.datetimepicker').datepicker({
            format: 'yyyy-mm-dd'
        });
        $("input[type='text']").addClear();
        $("#shenheBtn").on("click", function () {
            var formData = $("#shenheForm").serialize();
            $.ajax({
                type: "POST",
                dataType: 'json',
                url: "__URL__/shenheAjax",
                data: formData,
                success: function onSuccess(data) {
                    if(data.code > 0 ){
                        alertMsg(data.msg, {icon:'warning'});
                    }
                    else{
                        $("#shenheModal").modal("hide");
                        alertMsg(data.msg, {icon:'succeed'});
                        $('#list').DataTable().ajax.reload();
                    }
                },
                error: function onError(data, status) {
                    // handle an error
                }
            });
            return false;
        });
    });
</script>